/**
 * 
 */
package com.xb.demo2.template.method;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author kexue
 *
 */
public class TestMain {

	private static Logger logger = LoggerFactory.getLogger(TestMain.class);

	/**
	 * 参考Spring      org.springframework.jdbc.core.JdbcTemplate
	 * @param args
	 */
	public static void main(String[] args) {
		 
		final List<String> personList=new ArrayList<String>();
		JdbcTemplate.query("select * from table1", new CallbackProcess() {
			public void process(ResultSet rs) throws SQLException {
				 while(rs.next()){
					 personList.add(rs.getString("name"));
				 }
			}
		});
	}

}
